<html>
<head><meta charset="utf-8"><title>extern types and `Freeze` · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html">extern types and `Freeze`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="147301256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147301256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147301256">(Nov 08 2018 at 14:08)</a>:</h4>
<p>Should extern types not implement <code>Freeze</code>? We can't really know what's in them. Right now they might implement <code>Freeze</code>, i'm not quite sure how auto traits work with extern types: <a href="https://github.com/rust-lang/rust/blob/45088b11f55e57a65fa1ebcf6e3b6014152eb516/src/libcore/marker.rs#L598" target="_blank" title="https://github.com/rust-lang/rust/blob/45088b11f55e57a65fa1ebcf6e3b6014152eb516/src/libcore/marker.rs#L598">https://github.com/rust-lang/rust/blob/45088b11f55e57a65fa1ebcf6e3b6014152eb516/src/libcore/marker.rs#L598</a></p>



<a name="147304340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147304340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147304340">(Nov 08 2018 at 14:55)</a>:</h4>
<p>I thought that <code>Freeze</code> was removed pre 1.0 :)</p>



<a name="147304589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147304589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147304589">(Nov 08 2018 at 14:59)</a>:</h4>
<p>There definitely is a <code>#[lang="freeze"]</code> still</p>



<a name="147304617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147304617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147304617">(Nov 08 2018 at 14:59)</a>:</h4>
<p>in fact I believe it reappeared sometime after 1.8 or so. #{no_core] crates didn’t need to define the <code>Freeze</code> lang-trait after 1.0 untli some time later.</p>



<a name="147307636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147307636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> kennytm <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147307636">(Nov 08 2018 at 15:42)</a>:</h4>
<p>extern type doesn't implement any auto trait, and thus not Freeze (nor  Send nor Sync)</p>



<a name="147310284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147310284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147310284">(Nov 08 2018 at 16:17)</a>:</h4>
<p><code>Freeze</code> is used to implement some of the checks for statics iirc</p>



<a name="147310287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147310287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147310287">(Nov 08 2018 at 16:17)</a>:</h4>
<p>but it's not used exposed right now</p>



<a name="147660764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/extern%20types%20and%20%60Freeze%60/near/147660764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/extern.20types.20and.20.60Freeze.60.html#147660764">(Nov 14 2018 at 11:02)</a>:</h4>
<blockquote>
<p>extern type doesn't implement any auto trait, and thus not Freeze (nor  Send nor Sync)</p>
</blockquote>
<p>that's great</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>